package nml.mail.reg.smtp;

import nml.mail.reg.Reg;

import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class  in_com extends Reg{

	public void reg(String username, String password) {		
		

		String url = "http://secure.in.com/sso/commonregister.php?ref=IN";
		get(url);
		
		dr.findElement(By.name("fname")).sendKeys(username);
		
		
		dr.findElement(By.name("year")).sendKeys("1990");
		dr.findElement(By.name("month")).sendKeys("Feb");
		dr.findElement(By.name("day")).sendKeys("22");
		
		
		dr.findElement(By.name("username")).sendKeys(username);
		dr.findElement(By.name("password")).sendKeys(password);
		dr.findElement(By.name("repassword")).sendKeys(password);
		
		dr.findElement(By.name("altemail")).sendKeys("nml186@126.com");
		
		((JavascriptExecutor) dr).executeScript("  $('#recommendeddiv').hide();  ");
		
		dr.findElement(By.name("imageField")).click();
		
		
		 
		
		
		System.out.println(username+"@in.com");
		
	}

	public static void main(String[] args) {
		new in_com().reg("wedoitnow", "qq3131798654");
	}
	
	
}
